home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group02b.txt
/
000076_icon-group-sender_Fri Oct 18 17:05:53 2002.msg
< prev
next >
Wrap
Internet Message Format
|
2003-01-02
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id g9J05ec29243
for icon-group-addresses; Fri, 18 Oct 2002 17:05:40 -0700 (MST)
Message-Id: <200210190005.g9J05ec29243@baskerville.CS.Arizona.EDU>
Date: Fri, 18 Oct 2002 14:22:33 -0700
From: Steve Wampler <swampler@noao.edu>
X-Accept-Language: en
To: "Boulet, Dan" <BouleDa@navcanada.ca>
CC: "IconGroup (E-mail)" <icon-group@cs.arizona.edu>,
"Unicon Group (E-mail)" <unicon-group@lists.sourceforge.net>
Subject: Re: [Unicon-group] recursive generators
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
"Boulet, Dan" wrote:
---------------------------------------------------------------------------
This is an appeal to all experts in recursive generation. Given the
following string:
astring :=
"[main],a,b,c,d,[a],a1,[b],b1,b2,[c],c1,c2,c3,[d],1,2,3,[a1],a11,a12,a13,[b1
],b11,b12,b13,b14,[b2],b21,b22,b23,b24,[a11],x,y,z"
Does anyone have any ideas on how the following sub-strings can be
generated:
main,a,a1,a11,x
main,a,a1,a11,y
main,a,a1,a11,z
main,a,a1,a12
main,a,a1,a13
main,b,b1,b11
main,b,b1,b12
main,b,b1,b13
main,b,b1,b14
main,b,b2,b21
main,b,b2,b22
main,b,b2,b23
main,b,b2,b24
main,c,c1
main,c,c2
main,c,c3
main,d,1
main,d,2
main,d,3
-----------------------------------------------------------
Well, first a question - do you intend such strings to represent
just acyclic graphs or general graphs? (Affects the answer slightly.)
I don't know if this is what you're looking for, but I'd approach
the problem as a graph traversal problem. First parse the string
to build the graph and then generate all (acyclic) paths in the
graph starting at the root node (presumably, that's the first node
in the string, right?)
--
Steve Wampler -- swampler@noao.edu
Quantum materiae materietur marmota monax si marmota
monax materiam possit materiari?